import {
	apiBaseUrl
} from './config.js';
import * as common from './common.js' //引入common
import * as db from './db.js' //引入common
// 需要登陆的，都写到这里，否则就是不需要登陆的接口
const methodsToken = [
	'api.getcartids.FreePackage',
	'user.info',
	'user.editinfo',
	'user.changeavatar',
	'user.logout',
	'user.addgoodsbrowsing',
	'user.delgoodsbrowsing',
	'user.goodsbrowsing',
	'user.goodscollection',
	'user.goodscollectionlist',
	'user.vuesaveusership',
	'user.saveusership',
	'user.getshipdetail',
	'user.setdefship',
	'user.editship',
	'user.removeship',
	'user.getusership',
	'user.pay',
	'user.orderevaluate',
	'user.getuserdefaultship',
	'user.issign',
	'user.sign',
	'user.mypoint',
	'user.userpointlog',
	'user.getbankcardlist',
	'user.getdefaultbankcard',
	'user.addbankcard',
	'user.removebankcard',
	'user.setdefaultbankcard',
	'user.getbankcardinfo',
	'user.editpwd',
	'user.forgotpwd',
	'user.recommend',
	'user.balancelist',
	'user.sharecode',
	'user.cash',
	'user.cashlist',
	'user.myinvite',
	'user.activationinvite',
	'user.pointList',
	'user.addMessage',
	'coupon.getcoupon',
	'coupon.usercoupon',
	'cart.add',
	'cart.del',
	'cart.getlist',
	'cart.setnums',
	'cart.getnumber',
	'order.cancel',
	'order.del',
	'order.details',
	'order.confirm',
	'order.getlist',
	'order.create',
	'order.pay',
	'order.getship',
	'order.getorderlist',
	'order.getorderstatusnum',
	'order.aftersaleslist',
	'order.aftersalesinfo',
	// 'order.aftersalesstatus', //内容用order.details接口
	'order.addaftersales',
	'order.sendreship',
	'order.iscomment',
	'payments.getinfo',
	'user.getuserpoint',
	'coupon.getcouponkey',
	'store.isclerk',
	'store.storeladinglist',
	'store.ladinginfo',
	'store.lading',
	'store.ladingdel',
	'distribution_center-api-info',
	'distribution_center-api-applydistribution',
	'distribution_center-api-setstore',
	'distribution_center-api-myorder',
	'pintuan.pintuanteam',
	'lottery-api-getLotteryConfig',
	'lottery-api-lottery',
	'lottery-api-lotteryLog',
	'user.myinvoicelist',
	'payments.checkpay',
	'order.gettaxcode',
	'wechat_applets_message-api-tmpl',
	'wechat_applets_message-api-settip',
	'wechat_applets_message-api-closetip',
	'wechat_applets_message-api-istip',
	'bargain.dobargain',
	'bargain.goodsinfo',
	'bargain.add',
	'bargain.getuserbargainlog',
	'bargain.canclebargain',
	'api.hb.WelfarePro',
	'api.coupon.WelfarePro',
	'cart.batchsetcart',
	"user.getsigninfo",
	'user.getbankcardlist',
	'user.realName',
	'user.getbankcardinfo',
	'user.editbankcards',
	'goodsorder.create',
	'goodsorder.myorder',
	'goodsorder.delete',
	'user.recommend',
	'market.orderlist',
	'goodsorder.give',
	'goodsorder.giverecord',
	'goodsorder.givecancel',
	'market.create',
	'market.createQuick',

	'market.compound',
	'market.mymaterial',
	'Furnace.addmaterial',
	'manghe.boxlist',
	'manghe.openbox',

	'market.turnAdd',
	'market.giveRecord',
	'invite.rewardlist',
	'invite.getreward',
	'user.issetpayaassword',
	'user.editpaypassword',

	'user.getthirdpay',
	'user.addThird',
	'user.editThird',
	'manghe.myMangheList',
	'user.exchangePoint',
	'user.redboxLog',

	'market.myGoodsList',
	'market.getOrderByUidGid',
	'goodsorder.checkorderstatus',
	'invite.myLotteryList',

	'user.getInviteNum',


	'user.addArea',
	'community.givelike',
	'community.details',
	'community.getCommlist',
	'community.comGivelike',

	'community.addreport',
	'community.focus',
	'community.addComment',
	'community.addCommunity',
	'community.delCommunity',

	'stove.mymaterial',
	// 'stove.addmaterial',
	'goods.getLotteryCode',
	'stove.stoveList',
	'stove.addmaterial',
	'stove.record',
	'user.openUser',
	'Furnace.furnaceList',
	'Furnace.materialcount',
	'Furnace.furnace',
	'Furnace.material',
	'market.split',
	'market.splitMessage',
	'market.splitOrder',
	'user.checkPwd',
	'user.sumpayCashier',
	'goodsorder.orderRefund',
	'user.upCancel',
	'Furnace.synthesizedLog',
	'manghe.mangheList',
	'user.openAccount',
	'pointgoods.exchange',
	'pointgoods.exchangeLog',
	'pages.ai',
	'user.hfpay_wallet', //开通钱包接口 （汇付）,//两元费用接口
	'user.disRanking', //分销
	'user.derivative', //衍生品奖励
	'user.myCollect', //衍生品-我的收藏,
	'user.derivative_12',
	'user.getDerivativeList',
	'user.yspDetails',
	'user.updateOrder', //修改后的订单
	'mfh.getByUid',//免费喝领取订单列表

	'derive' //衍生品奖励
];
const post = (method, data, callback, complete,loading=true) => {
	if(loading){
		showLoading()
	}
	// 判断token是否存在
	let userToken = db.get("userToken");
	uni.request({
		url: apiBaseUrl + method,
		data: data,
		sslVerify: false,
		header: {
			'Accept': 'application/json',
			'Content-Type': 'application/json',
			'Authorization': 'Bearer ' + userToken
			// 'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息
		},
		method: 'POST',
		success: (response) => {
			// uni.hideLoading();
			const result = response.data
			if (!result.status) {
				// 登录信息过期或者未登录
				if (result.data === 11101) {
					db.del("userToken");
					uni.showToast({
						title: result.msg,
						icon: 'none',
						duration: 1000,
						complete: function() {
							setTimeout(function() {
								uni.hideToast();
								let current = getCurrentPages()
								current = current[current.length - 1]
								if (current.route.indexOf(
										'pages/login/login') > -1 || current
									.route.indexOf('/pages/login/login') > -1
								) {
									return
								}
								// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
								uni.navigateTo({
									url: '/pages/login/login'
								})
								// #endif
								// #ifdef MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO
								uni.navigateTo({
									url: '/pages/login/login',
									animationType: 'pop-in',
									animationDuration: 200,
									complete() {
										hideLoading()
									}
								});
								// #endif
							}, 1000)
						}
					});
				}
			}
			if (result.data == 60007) {
				uni.navigateTo({
					url: '/pages/user/apply/apply'
				})
			}
			if (result.data == 10902) {
				uni.reLaunch({
					url: '/pages/stop/stop'
				})
			}
			if (result.data == 60008) {
				uni.navigateTo({
					url: '/pages/user/settings/bank/bank'
				})
			}
			callback(result);
		},

		complete: (response) => {
			
			setTimeout(function() {
				hideLoading()
			}, 100)
			complete ? complete() : "";
		},
		fail: (error) => {
			//#ifdef APP-IOS || APP-ANDROID
			const theme = uni.getStorageSync('theme');
			let color = theme == 'purple' ? "#000000" : "#ffffff"
			let style = theme == 'purple' ? "black" : "white"
			var styles = {
				color: color,
				background: "rgba(0,0,0,0.0)",
				style: style,
			}
			var waiting = plus.nativeUI.showWaiting("网络开小差了", styles);
			//#endif
			// #ifndef APP-IOS || APP-ANDROID
			uni.showLoading({
				title: '网络开小差了'
			});
			// #endif
			hideLoading()
			if (error && error.response) {
				showError(error.response);
			} else {}
		},
	});
}

//插件post
const pluginsPost = (method, data, callback,loading=true) => {
	if(loading){
		showLoading()
	}
	// 判断token是否存在
	if (methodsToken.indexOf(method) >= 0) {
		// 获取用户token
		let userToken = db.get("userToken");
		if (!userToken) {
			hideLoading()
			common.jumpToLogin();
			return false;
		} else {
			data.token = userToken;
		}
	}
	uni.request({
		url: apiBaseUrl + 'plugins/' + method + '.html',
		data: data,
		sslVerify: false,
		header: {
			'Accept': 'application/json',
			'Content-Type': 'application/json',
			// 'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息
		},
		method: 'POST',
		success: (response) => {
			hideLoading()
			const result = response.data
			if (!result.status) {
				// 登录信息过期或者未登录
				if (result.data === 14007 || result.data === 14006) {
					db.del("userToken");
					uni.showToast({
						title: result.msg,
						icon: 'none',
						duration: 1000,
						complete: function() {
							setTimeout(function() {
								let current = getCurrentPages()
								current = current[current.length - 1]
								if (current.route.indexOf(
										'pages/login/login') > -1 || current
									.route.indexOf('/pages/login/login') > -1
								) {
									return
								}
								uni.hideToast();
								// #ifdef H5 || APP-PLUS || APP-PLUS-NVUE
								uni.navigateTo({
									url: '/pages/login/login'
								})
								// #endif
								// #ifdef MP-WEIXIN || MP-ALIPAY || MP-TOUTIAO
								uni.navigateTo({
									url: '/pages/login/login',
									animationType: 'pop-in',
									animationDuration: 200
								});
								// #endif
							}, 500);
						}
					});
				}
				if (result.data === 60008) {
					uni.navigateTo({
						url: '/pages/user/settings/bank/bank'
					})
				}
			}
			callback(result);
		},
		fail: (error) => {
			hideLoading()
			if (error && error.response) {
				showError(error.response);
			}
		},
		complete: () => {
			setTimeout(function() {
				hideLoading()
			}, 250);
		}
	});

}
const get = (url, data, callback,loading=true) => {
	if(loading){
		showLoading()
	}
	let token = db.get("userToken");
	// let url1 = apiBaseUrl + url
	// console.log('接口'+url1)
	uni.request({
		url: apiBaseUrl + url,
		header: {
			'Accept': 'application/json',
			'Authorization': 'Bearer ' + token
		},
		method: 'GET',
		data: data,
		sslVerify: false,
		success: (response) => {
			hideLoading()
			const result = response.data
			if (!result.status) {
				// 登录信息过期或者未登录
				if (result.code === 11101) {
					db.del("userToken");
					uni.navigateTo({
						url: '/pages/login/login'
					})
				}
			}
			callback(response.data);
		},
		fail: (error) => {
			// console.log('请求失败'+JSON.stringify(error))
			hideLoading()
			if (error && error.response) {
				// showError(error.response);
			}
		},
		complete: (r) => {
			// console.log('请求结束'+JSON.stringify(r))
			setTimeout(function() {
				hideLoading()
			}, 250);
		}
	});
}
const put = (url, data, callback, complete,loading=true) => {
	if(loading){
		showLoading()
	}

	let token = db.get("userToken");
	uni.request({
		url: apiBaseUrl + url,
		data: data,
		sslVerify: false,
		header: {
			'Accept': 'application/json',
			'Content-Type': 'application/json',
			'Authorization': 'Bearer ' + token
		},
		method: 'PUT',
		success: (response) => {
			hideLoading()
			const result = response.data
			if (!result.status) {
				// 登录信息过期或者未登录
				if (result.code === 11101) {
					db.del("userToken");
					uni.navigateTo({
						url: '/pages/login/login'
					})
				}
			}
			callback(result);
		},

		complete: (response) => {
			setTimeout(function() {
				hideLoading()
			}, 100)
			complete ? complete() : "";
		},
		fail: (error) => {
			uni.showLoading({
				title: '网络开小差了'
			});
			// setTimeout(function() {
			hideLoading()
			// }, 1000)
			if (error && error.response) {
				showError(error.response);
			} else {

			}
		},
	});
}

// 文件上传
export const uploadFiles = (callback) => {
	uni.chooseImage({
		success: (chooseImageRes) => {
			//#ifdef APP-IOS || APP-ANDROID
				const theme = uni.getStorageSync('theme');
				let color = theme == 'purple' ? "#000000" : "#ffffff"
				let style = theme == 'purple' ? "black" : "white"
				var styles = {
					color: color,
					background: "rgba(0,0,0,0.0)",
					style: style,
				}
				var waiting = plus.nativeUI.showWaiting("上传中...", styles);
			//#endif
			// #ifndef APP-IOS || APP-ANDROID
				uni.showLoading({
					title: '上传中...'
				});
			// #endif
			const tempFilePaths = chooseImageRes.tempFilePaths;
			const uploadTask = uni.uploadFile({
				url: apiBaseUrl + 'api.html', //仅为示例，非真实的接口地址
				filePath: tempFilePaths[0],
				fileType: 'image',
				name: 'file',
				headers: {
					'Accept': 'application/json',
					'Content-Type': 'multipart/form-data',
				},
				formData: {
					'method': 'images.upload',
					'upfile': tempFilePaths[0]
				},
				success: (uploadFileRes) => {
					callback(JSON.parse(uploadFileRes.data));
				},
				fail: (error) => {
					if (error && error.response) {
						showError(error.response);
					}
				},
				complete: () => {
					setTimeout(function() {
						hideLoading()
					}, 250);
				}
			});
			// 					uploadTask.onProgressUpdate((res) => {
			//             console.log('上传进度' + res.progress);
			//             console.log('已经上传的数据长度' + res.totalBytesSent);
			//             console.log('预期需要上传的数据总长度' + res.totalBytesExpectedToSend);
			//
			//             // 测试条件，取消上传任务。
			//             if (res.progress > 50) {
			//                 uploadTask.abort();
			//             }
			// 					});
		}
	});
}

// 上传图片
export const uploadImage = (num, callback) => {
	uni.chooseImage({
		count: num,
		success: (res) => {
			//#ifdef APP-IOS || APP-ANDROID
				const theme = uni.getStorageSync('theme');
				let color = theme == 'purple' ? "#000000" : "#ffffff"
				let style = theme == 'purple' ? "black" : "white"
				var styles = {
					color: color,
					background: "rgba(0,0,0,0.0)",
					style: style,
				}
				var waiting = plus.nativeUI.showWaiting("上传中...", styles);
			//#endif

			// #ifndef APP-IOS || APP-ANDROID
				uni.showLoading({
					title: '上传中...'
				});
			// #endif
			let tempFilePaths = res.tempFilePaths
			for (var i = 0; i < tempFilePaths.length; i++) {
				uni.uploadFile({
					url: apiBaseUrl + 'api.html',
					filePath: tempFilePaths[i],
					fileType: 'image',
					name: 'file',
					headers: {
						'Accept': 'application/json',
						'Content-Type': 'multipart/form-data',
					},
					formData: {
						'method': 'images.upload',
						'upfile': tempFilePaths[i]
					},
					success: (uploadFileRes) => {
						callback(JSON.parse(uploadFileRes.data));
					},
					fail: (error) => {
						if (error && error.response) {
							showError(error.response);
						}
					},
					complete: () => {
						setTimeout(function() {
							hideLoading()
						}, 250);
					},
				});
			}
		}
	});
}

const showError = error => {
	let errorMsg = ''
	switch (error.status) {
		case 400:
			errorMsg = '请求参数错误'
			break
		case 401:
			errorMsg = '未授权，请登录'
			break
		case 403:
			errorMsg = '跨域拒绝访问'
			break
		case 404:
			errorMsg = `请求地址出错: ${error.config.url}`
			break
		case 408:
			errorMsg = '请求超时'
			break
		case 500:
			errorMsg = '服务器内部错误'
			break
		case 501:
			errorMsg = '服务未实现'
			break
		case 502:
			errorMsg = '网关错误'
			break
		case 503:
			errorMsg = '服务不可用'
			break
		case 504:
			errorMsg = '网关超时'
			break
		case 505:
			errorMsg = 'HTTP版本不受支持'
			break
		default:
			errorMsg = error.msg
			break
	}

	uni.showToast({
		title: errorMsg,
		icon: 'none',
		duration: 1000,
		complete: function() {
			setTimeout(function() {
				uni.hideToast();
			}, 1000);
		}
	});
}
const showLoading = () =>{
	//#ifdef APP-IOS || APP-ANDROID
	const theme = uni.getStorageSync('theme');
	let color = theme == 'purple' ? "#000000" : "#ffffff"
	let style = theme == 'purple' ? "black" : "white"
	var styles = {
		color: color,
		background: "rgba(0,0,0,0.0)",
		style: style,
	}
	var waiting = plus.nativeUI.showWaiting("加载中", styles);
	//#endif
	// #ifndef APP-IOS || APP-ANDROID
	uni.showLoading({
		title: '加载中',
	});
	// #endif
}
const hideLoading = () => {
	//#ifdef APP-PLUS
	plus.nativeUI.closeWaiting();
	//#endif
	uni.hideLoading();
}
 /*拉环免费喝接口*/

// token换token
export const token_to_token = (data, callback) => post('passport/jyToken', data, callback);
// 获取免登token
export const redirect_get_token = (data, callback) => get( 'pull/ring/home', data, callback);
// 用户中奖接口
export const people_get_reward = (data, callback) => post('pull/ring/lottery', data, callback);
// 用户领取奖励
export const apply_the_reward = (data, callback) => post('pull/ring/accessByMfhId', data, callback);
// 用户中奖列表
export const people_reward_list = (data, callback) => get( 'pull/ring/lottery/list', data, callback);
// echarts 统计列表
export const echarts_offer = (data, callback) => get( 'order/echartOffer', data, callback);
/* AI大赛，比赛页面 */
export const aievent_list = (data, callback) => post( 'aievent/aiEventWorks/aieventList', data, callback);
/* AI大赛，所有作品 */
export const aievent_all_list = (id,sn, callback) => post( `aievent/aiEventWorks/aiEventList?aiEventId=${id}&sn=${sn || ''}`, {}, callback);
//ai大赛我的列表
export const aiEventWorkslist = (pageNo, callback) => post( `aievent/aiEventWorks/list?pageNo=${pageNo}`, {}, callback);
export const aievent_detail = (data, callback) => get( 'aievent/aiEvent/detail', data, callback);
export const aievent_vote = (data, callback) => post( 'aievent/aiTicketLog/aiTicketLogSave', data, callback);
// 获取店铺配置
export const shopConfig = (callback) => get(apiBaseUrl + 'api/common/jshopconf', callback);
// 用户注册
export const reg = (data, callback) => post('passport/signup', data, callback);
export const getImageCaptcha = (data, callback) => get('passport/captcha/image', data, callback);
export const sms = (data, callback) => post('passport/captcha/sms', data, callback);
// 用户登录
export const login = (data, callback) => post('passport/signin', data, callback);
export const password = (data, callback) => put('passport/password', data, callback);

// 用户信息
export const userInfo = (data, callback) => get('user/profile', data, callback);
export const userAccount = (data, callback) => get('user/account', data, callback);
export const getBanner = (data, callback) => get('banner', data, callback);
// 上传头像
export const changeAvatar = (data, callback) => post('user.changeavatar', data, callback);

// 编辑用户信息
export const editInfo = (data, callback, complete) => put('user/profilse', data, callback, complete);
// 检查是否有交易密码
export const checkSecondPassword = (data, callback) => post(`mfh/secondPassword`, data, callback);

// 短信验证码登录
export const smsLogin = (data, callback) => post('passport/signin/sms', data, callback);
// 未注册短信验证码登录 微信
export const signupwx = (data, callback) => post('passport/signupwx', data, callback);
// 退出登录
export const logout = (data, callback) => post('user.logout', data, callback);

// 获取首页幻灯片
export const slider = (data, callback) => post('advert.getAdvertList', data, callback);

// 获取广告
export const advert = (data, callback) => post('advert.getcarousellists', data, callback);

// 获取公告列表
export const notice = (data, callback) => get('notice', data, callback);
export const realName = (data, callback) => post('user/account/certified', data, callback);
//公告类型
export const noticeType = (data, callback) => post('notice.noticeType', data, callback);

// 获取公告详情
export const noticeInfo = (data, callback) => get('notice/' + data, {}, callback);

//获取新闻发声类型
// export const getNewsType = (data, callback) => get('news/category', data, callback);
export const getNewsType = (data, callback) => get('home/news/category', data, callback);
// 获取新闻发声列表
// export const getNewsList = (data, callback) => get('news', data, callback);
export const getNewsList = (data, callback) => get('home/news', data, callback);

// 获取辟谣墙列表
export const getMessageList = (data, callback) => post('user.getMessage', data, callback);

// 发布辟谣墙
export const addMessage = (data, callback) => post('user.addMessage', data, callback);

// 获取文章详情
export const articleInfo = (data, callback) => get('home/news/' + data, {}, callback);

// 获取文章列表
export const articleList = (data, callback) => post('articles.getArticleList', data, callback);
// 获取首页文章列表
export const article = (data, callback) => post('articles.getArticle', data, callback);

// 获取商品分类
export const categories = (data, callback) => post('categories.getallcat', data, callback);
//获取子分类
export const getChildCat = (data, callback) => post('categories.getchildcat', data, callback);

// 获取商品列表
export const goodsList = (data, callback) => post('goods.getlist', data, callback);

// 获取商品详情
export const goodsDetail = (data, callback) => post('goods.getdetial', data, callback);

// 获取商品参数信息
export const goodsParams = (data, callback) => post('goods.getgoodsparams', data, callback);

// 获取设置默认货品
export const getProductInfo = (data, callback) => post('goods.getproductinfo', data, callback);

// 获取商品评论信息
export const goodsComment = (data, callback) => post('goods.getgoodscomment', data, callback);

// 添加购物车
export const addCart = (data, callback, complete) => post('cart.add', data, callback, complete);

// 移除购物车
export const removeCart = (data, callback) => post('cart.del', data, callback);

// 获取购物车列表
export const cartList = (data, callback) => post('cart.getlist', data, callback);

// 设置购物车商品数量
export const setCartNum = (data, callback) => post('cart.setnums', data, callback);

// 获取购物车数量
export const getCartNum = (data, callback) => post('cart.getnumber', data, callback);

// 获取用户的收货地址列表
export const userShip = (data, callback) => post('user.getusership', data, callback);

// 获取用户默认收货地址
export const userDefaultShip = (data, callback) => post('user.getuserdefaultship', data, callback);

// 存储用户收货地址 废弃
export const saveUserShip = (data, callback, complete) => post('user.vuesaveusership', data, callback, complete);

// 微信存储收货地址 废弃
export const saveUserShipWx = (data, callback) => post('user.saveusership', data, callback);

//获取区域ID
export const getAreaId = (data, callback) => post('user.getareaid', data, callback);

// 获取收货地址详情
export const shipDetail = (data, callback, complete) => post('user.getshipdetail', data, callback, complete);

// 收货地址编辑
export const editShip = (data, callback) => post('user.editship', data, callback);

// 收货地址删除
export const removeShip = (data, callback, complete) => post('user.removeship', data, callback, complete);

// 设置默认收货地址
export const setDefShip = (data, callback) => post('user.setdefship', data, callback);

// 生成订单
export const createOrder = (data, callback, complete) => post('order.create', data, callback, complete);
//积分订单支付
export const payOrder = (data, callback, complete) => post('order.pay', data, callback, complete);

// 取消订单
export const cancelOrder = (data, callback) => put('order/cancel', data, callback);
export const cancelOrderBatch = (data, callback) => put('order/batch/cancel', data, callback);
// 删除订单
export const delOrder = (data, callback) => post('order.del', data, callback);

// 获取订单详情
export const orderDetail = (data, callback) => get('order/' + data, {}, callback);
export const orderBatchDetail = (data, callback) => get('order/batch/' + data, {}, callback);
export const hfwallet = (callback, data) => get('wallet/hfpay', data, callback);
export const sdwallet = (callback, data) => post('wallet/sandPay', data, callback);
// 确认收货
export const confirmOrder = (data, callback) => post('order.confirm', data, callback);
//钱包支付单个订单
export const payHfOrder = (data, callback) => post('order/pay', data, callback);
// 钱包支付批量
export const payHfOrderBatch = (data, callback) => post('order/batch/pay', data, callback);
// 获取配送方式
export const orderShip = (data, callback) => post('order.getship', data, callback);

// 获取全部订单列表
export const orderList = (data, callback) => get('order', data, callback);

// 获取订单不同状态的数量
export const getOrderStatusSum = (data, callback) => post('order.getorderstatusnum', data, callback);

// 售后单列表
export const afterSalesList = (data, callback) => post('order.aftersaleslist', data, callback);

// 售后单详情
export const afterSalesInfo = (data, callback) => post('order.aftersalesinfo', data, callback);

// 订单售后状态
// export const afterSalesStatus = (data, callback) => post('order.aftersalesstatus', data, callback);

// 添加售后单
export const addAfterSales = (data, callback, complete) => post('order.addaftersales', data, callback, complete);

// 用户发送退货包裹
export const sendShip = (data, callback) => post('order.sendreship', data, callback);

// 添加商品浏览足迹
export const addGoodsBrowsing = (data, callback) => post('user.addgoodsbrowsing', data, callback);

// 删除商品浏览足迹
export const delGoodsBrowsing = (data, callback) => post('user.delgoodsbrowsing', data, callback);

// 获取商品浏览足迹
export const goodsBrowsing = (data, callback) => post('user.goodsbrowsing', data, callback);

// 商品收藏 关注/取消
export const goodsCollection = (data, callback) => post('user.goodscollection', data, callback);

// 获取商品收藏关注列表
export const goodsCollectionList = (data, callback) => post('user.goodscollectionlist', data, callback);

// 获取店铺支付方式列表
export const paymentList = (data, callback) => post('payments.getlist', data, callback);

// 获取支付单详情
export const paymentInfo = (data, callback) => post('payments.getinfo', data, callback);

// 支付接口
export const pay = (data, callback) => post('user.pay', data, callback);

// 订单评价接口
export const orderEvaluate = (data, callback, complete) => post('user.orderevaluate', data, callback, complete);

// 判断是否签到
export const isSign = (data, callback) => post('user.issign', data, callback);
//修改状态订单
export const updateOrder = (data, callback) => post('user.updateOrder', data, callback);

// 签到接口
export const sign = (data, callback) => post('user.sign', data, callback);

// 我的积分
export const myPoint = (data, callback) => post('user.mypoint', data, callback);

// 积分记录
export const pointLog = (data, callback) => post('user.userpointlog', data, callback);

// 物流信息接口
export const logistics = (data, callback) => post('order.logisticbyapi', data, callback);

// 优惠券列表
export const couponList = (data, callback) => post('coupon.couponlist', data, callback);

// 优惠券详情
export const couponDetail = (data, callback) => post('coupon.coupondetail', data, callback);

// 用户领取优惠券
export const getCoupon = (data, callback) => post('coupon.getcoupon', data, callback);

// 用户已领取的优惠券列表
export const userCoupon = (data, callback) => post('coupon.usercoupon', data, callback);

// 获取店铺设置
export const getSetting = (data, callback) => post('user.getsetting', data, callback);

// 获取商户配置信息
export const getSellerSetting = (data, callback) => post('user.getsellersetting', data, callback);

// 获取我的银行卡列表
export const getBankCardList = (data, callback) => post('user.getbankcardlist', data, callback);

// 获取默认的银行卡
export const getDefaultBankCard = (data, callback) => post('user.getdefaultbankcard', data, callback);

// 添加银行卡
export const addBankCard = (data, callback, complete) => post('user.addbankcard', data, callback, complete);

// 删除银行卡
export const removeBankCard = (data, callback) => post('user.removebankcard', data, callback);

// 设置默认银行卡
export const setDefaultBankCard = (data, callback, complete) => post('user.setdefaultbankcard', data, callback,
	complete);

// 获取银行卡信息
export const getBankCardInfo = (data, callback) => post('user.getbankcardinfo', data, callback);

// 获取银行卡组织信息
export const getBankCardOrganization = (data, callback) => post('user.getbankcardorganization', data, callback);

// 用户修改密码
export const editPwd = (data, callback, complete) => post('user.editpwd', data, callback, complete);

// 用户找回密码
export const forgotPwd = (data, callback) => post('user.forgotpwd', data, callback);

// 获取用户余额明细
export const getBalanceList = (data, callback) => post('user.balancelist', data, callback);

// 用户推荐列表
export const recommendList = (data, callback) => post('user.recommend', data, callback);

// 邀请码
export const shareCode = (data, callback) => post('user.sharecode', data, callback);

// 用户提现
export const userToCash = (data, callback, complete) => post('user.cash', data, callback, complete);

// 用户提现列表
export const cashList = (data, callback) => post('user.cashlist', data, callback);

// 绑定授权登录
export const trustBind = (data, callback) => post('user.trustbind', data, callback);

// 获取用户信息
// export const trustLogin = (data, callback) => post('user.trustcallback', data, callback);

// 判断用户下单可以使用多少积分
export const usablePoint = (data, callback) => post('user.getuserpoint', data, callback);

// 门店列表
export const storeList = (data, callback) => post('store.getstorelist', data, callback);

// 判断是否开启门店自提
export const switchStore = (data, callback) => post('store.getstoreswitch', data, callback);

// 获取默认的门店
export const defaultStore = (data, callback) => post('store.getdefaultstore', data, callback);

// 判断是否开启积分
export const isPoint = (data, callback) => post('user.ispoint', data, callback);

// 用户输入code领取优惠券
export const couponKey = (data, callback) => post('coupon.getcouponkey', data, callback);

// 判断是否是店员
export const isStoreUser = (data, callback) => post('store.isclerk', data, callback);

// 获取店铺提货单列表
export const storeLadingList = (data, callback) => post('store.storeladinglist', data, callback);

// 获取提货单详情
export const ladingInfo = (data, callback) => post('store.ladinginfo', data, callback);

// 店铺提单操作
export const ladingExec = (data, callback) => post('store.lading', data, callback);

// 提货单删除
export const ladingDel = (data, callback) => post('store.ladingdel', data, callback);

// 获取活动列表
export const activityList = (data, callback) => post('group.getlist', data, callback);

// 获取活动详情
export const activityDetail = (data, callback) => post('group.getgoodsdetial', data, callback);

//小程序解析code
export const login1 = (data, callback) => post('user.wxapplogin1', data, callback);

//小程序登录第二步
export const login2 = (data, callback) => post('user.wxapplogin2', data, callback);

//支付宝小程序解析code
export const alilogin1 = (data, callback) => post('user.alipayapplogin1', data, callback);

//取下级地址列表
export const getAreaList = (data, callback) => post('user.getarealist', data, callback);

//取搜索页推荐关键字
export const getRecommendKeys = (callback) => post('store.getrecommendkeys', {}, callback);

// 获取我的邀请信息
export const myInvite = (callback) => post('user.myinvite', {}, callback);

// 设置我的上级邀请人
export const setMyInvite = (data, callback) => post('user.activationinvite', data, callback);

// 获取小程序二维码
export const getInviteQRCode = (data, callback) => post('store.getinviteqrcode', data, callback);

// 生成海报
export const createPoster = (data, callback) => post('user.getposter', data, callback);

// 获取秒杀团购
export const getGroup = (data, callback) => post('group.getlist', data, callback);

// 获取秒杀团购详情
export const groupInfo = (data, callback) => post('group.getgoodsdetial', data, callback);

// 自定义页面
export const getPageConfig = (data, callback) => post('pages.getpageconfig', data, callback);

//万能表单
export const getFormDetial = (data, callback) => post('form.getformdetial', data, callback);

//提交表单
export const addSubmitForm = (data, callback, complete) => post('form.addsubmit', data, callback, complete);

//公众号授权获取openid
export const getOpenId = (data, callback) => post('user.officiallogin', data, callback);

// 获取授权登录方式
export const getTrustLogin = (data, callback) => post('user.gettrustlogin', data, callback);

// APP信任登录
export const appTrustLogin = (data, callback) => post('user.uniapplogin', data, callback);
//微信授权登陆
export const appSigninWeixin = (data, callback) => post('passport/signinWeixin', data, callback);
//绑定微信
export const appboundWeixin = (data, callback) => post('passport/bound', data, callback);
//解除微信
export const apprelieveWeixin = (data, callback) => post('passport/relieve', data, callback);


// 获取分销商进度状态
export const getDistributioninfo = (data, callback) => pluginsPost('distribution_center-api-info', data, callback);

// 申请分销商
export const applyDistribution = (data, callback) => pluginsPost('distribution_center-api-applydistribution', data,
	callback);

// 店铺设置
export const setStore = (data, callback) => pluginsPost('distribution_center-api-setstore', data, callback);

//我的分销订单
export const getStoreInfo = (data, callback) => pluginsPost('distribution_center-api-getstoreinfo', data, callback);

//我的分销订单
export const getDistributionOrder = (data, callback) => pluginsPost('distribution_center-api-myorder', data, callback);

// 拼团列表
export const pintuanList = (data, callback) => post('pintuan.list', data, callback);

// 拼团商品详情
export const pintuanGoodsInfo = (data, callback) => post('pintuan.goodsinfo', data, callback);

// 拼团货品详情
export const pintuanProductInfo = (data, callback) => post('pintuan.productinfo', data, callback);

//微信图文消息
export const messageDetail = (data, callback) => post('articles.getweixinmessage', data, callback);

//获取APP版本
// export const getAppVersion = (data, callback) => pluginsPost('app-api-checkVersion', data, callback);
export const getAppVersion = (data, callback) => post('user.appversion', data, callback);

//获取APP版本
export const getOrderPintuanTeamInfo = (data, callback) => post('pintuan.pintuanteam', data, callback);

//抽奖规则
export const lotteryConfig = (callback) => pluginsPost('lottery-api-getLotteryConfig', {}, callback);

//抽奖操作
export const lottery = (callback) => pluginsPost('lottery-api-lottery', {}, callback);

//获取我的抽奖记录
export const myLottery = (data, callback) => pluginsPost('lottery-api-lotteryLog', data, callback);

//生成分享URL
export const createShareUrl = (data, callback) => post('user.shareurl', data, callback);

//获取我的发票列表
export const myInvoiceList = (data, callback) => post('user.myinvoicelist', data, callback);

//获取支付信息
export const paymentsCheckpay = (data, callback) => post('payments.checkpay', data, callback);

//忘记密码
export const userForgetPwd = (data, callback) => post('user.forgetPwd', data, callback);

//头条小程序登录
export const ttlogin = (data, callback) => post('user.ttlogin', data, callback);

//发票模糊查询
export const getTaxInfo = (data, callback) => post('order.gettaxcode', data, callback);

//获取订阅模板
export const getSubscriptionTmplIds = (data, callback) => pluginsPost('wechat_applets_message-api-tmpl', data,
	callback);

//订阅状态修改
export const setSubscriptionStatus = (data, callback) => pluginsPost('wechat_applets_message-api-settip', data,
	callback);

//用户关闭订阅提醒
export const subscriptionCloseTip = callback => pluginsPost('wechat_applets_message-api-closetip', {}, callback);

//判断用户是否需要显示订阅提醒
export const subscriptionIsTip = callback => pluginsPost('wechat_applets_message-api-istip', {}, callback);

//统一分享
export const share = (data, callback) => post('user.share', data, callback);

//统一分享解码
export const deshare = (data, callback) => post('user.deshare', data, callback);

//绑定手机号
export const bindMobile = (data, callback) => post('user.bindMobile', data, callback);

//获取砍价商品列表
export const getBargainList = (data, callback) => post('bargain.list', data, callback);

//获取砍价商品详情
export const getBargainDetial = (data, callback) => post('bargain.goodsinfo', data, callback);

//砍一刀
export const doBargain = (data, callback) => post('bargain.dobargain', data, callback);

//砍一刀
export const addBargain = (data, callback) => post('bargain.add', data, callback);
//砍一刀参与活动记录
export const getUserBargainLog = (data, callback) => post('bargain.getuserbargainlog', data, callback);

//取消砍一刀活动
export const cancleBargain = (data, callback) => post('bargain.canclebargain', data, callback);

//分享领取红包
export const getShareHb = (data, callback) => post('api.hb.WelfarePro', data, callback);

//分享领取优惠券
export const getShareCoupon = (data, callback) => post('api.coupon.WelfarePro', data, callback);


//团购秒杀获取货品信息
export const getGroupProductInfo = (data, callback) => post('group.getproductinfo', data, callback);

// 分享配置
export const getShareInfo = (data, callback) => post('weixinshare.share', data, callback);

// 获取首页配置
export const getHomePageConfig = (data, callback) => post('pages.gethomepageconfig', data, callback);

// 批量加入购物车
export const batchsetcart = (data, callback) => post('cart.batchsetcart', data, callback);

// 获取套餐配置信息
export const freePackage = (data, callback) => post('api.setting.FreePackage', data, callback);

// 获取购物车套餐商品货品id
export const GetcartidsFreePackage = (data, callback) => post('api.getcartids.FreePackage', data, callback);

// 商城端签到日志
export const getsigninfo = (data, callback) => post('user.getsigninfo', data, callback);

// 获取奖励描述
export const rewarddesc = (data, callback) => post('common.rewarddesc', data, callback);

//2开接口

//首页
export const getIndexData = (data, callback) => get('item', data, callback);
//一级市场购买单个
// export const createItemOrder = (data, callback) => post('order/create/item', data, callback);
//一级市场批量购买
export const createItemOrder = (data, callback) => post('order/batch/create/item', data, callback);
export const getIndexCalendar = (data, callback) => post('goods.calendar', data, callback);
export const createBatchOrder = (data, callback) => post('order/batch/create/nft', data, callback);
export const getGoodsDetails = (data, callback) => get('item/' + data, {}, callback);

//我的银行卡列表
export const getBankList = (data, callback) => post('user.getbankcardlist', data, callback);
//银行卡详情
export const getBankInfo = (data, callback) => post('user.getbankcardinfo', data, callback);

//修改银行卡
export const editBankInfo = (data, callback) => post('user.editbankcards', data, callback);

//创建订单
export const createOrder2 = (data, callback) => post('goodsorder.create', data, callback);
//我的订单
export const getOrderList = (data, callback) => get('order', data, callback);
export const getOrderBatchList = (data, callback) => get('order/batch', data, callback);
//取消订单
export const cancelOrder2 = (data, callback) => post('goodsorder.delete', data, callback);

//查看邀请记录
export const getMyInviteList = (data, callback) => get('user/invite', data, callback);
//查看他人
export const getInviteList = (data, callback) => post('user.lowerRecommend', data, callback);
//获取分类
export const getCategory = (data, callback) => get('item/category', data, callback);

//藏品订单列表
export const getCollectionList = (data, callback) => get('nft/group', data, callback);
//藏品详情
export const getCollectionDetails = (data, callback) => get('nft/' + data, {}, callback);
//转售
export const sale = (data, callback) => post('nft/sale/up', data, callback);
//转售记录
export const saleRecord = (data, callback) => get('nft', data, callback);
//最新--转售记录
export const saleNftRecord = (data, callback) => get('nft/sell', data, callback);
//转赠
export const give = (data, callback) => get('nft/give', data, callback);
export const soldRecord = (data, callback) => get('nft/sale/sold', data, callback);
export const saleCancel = (data, callback) => put('nft/sale/down', data, callback);

//获取市场列表
export const getMarketList = (data, callback) => get('nft/market/group', data, callback);
//获取市场列表折叠
export const getMarketGoodsListt = (data, callback) => get('nft/market', data, callback);

export const marketSaleLog = (data, callback) => get('nft/market/sale/log', data, callback);
//二手的订单创建
export const createMartOrder = (data, callback) => post('order/create/nft', data, callback);
export const quickMartOrder = (data, callback) => post('market.createQuick', data, callback);

//获取合成列表
export const getCompoundList = (data, callback) => post('market.compound', data, callback);
//获取合成详情
export const getCompoundDetails = (data, callback) => post('market.compoundshow', data, callback);
//获取合成材料列表
export const getMaterial = (data, callback) => post('market.material', data, callback);
//获取我的可用于合成的藏品
export const getMyMaterial = (data, callback) => post('market.mymaterial', data, callback);
//合成藏品
export const compound = (data, callback) => post('nft/merge', data, callback);
//获取盲盒列表
export const getBoxList = (data, callback) => post('manghe.boxlist', data, callback);
//开盲盒
export const openBox = (data, callback) => post('nft/box/open', data, callback);
//查看用户
export const getUserInfo = (phone, callback) => get(`user/account/${phone}`,{},callback);//user.userMobile

//转增物品
export const giveItem = (data, callback) => post('nft/give', data, callback);//market.turnAdd
//获取转增记录
// export const getGiveRecord = (data, callback) => post('market.giveRecord', data, callback);
export const getGiveRecord = (data, callback) => post('nft/give/list', data, callback);

//获取邀请奖励信息
export const getInviteRewards = (data, callback) => post('invite.rewardlist', data, callback);
//领取邀请奖励
export const getInvite = (data, callback) => post('invite.getreward', data, callback);
//是否设置支付密码
export const issetPayPass = (data, callback) => post('user.issetpayaassword', data, callback);
//设置支付密码
export const setPayPass = (data, callback) => put('user/account/secondPassword', data, callback);

//获取收款信息
export const getUserCollectInfo = (data, callback) => post('user.getthirdpay', data, callback);
//添加微信、支付宝信息
export const addThird = (data, callback) => post('user.addThird', data, callback);

export const editThird = (data, callback) => post('user.editThird', data, callback);
//获取忙和记录
export const getMangheRecord = (data, callback) => post('manghe.myMangheList', data, callback);
//获取忙和记录
export const exchangePoint = (data, callback) => post('user.exchangePoint', data, callback);

//红包记录
export const redboxLog = (data, callback) => post('user.redboxLog', data, callback);
//获取图片验证码
export const getImgCode = (data, callback) => post('user.sendCaptcha', data, callback);
//排行榜规则
export const rulecategory = (data, callback) => get('rule/category', data, callback);
export const rule = (data, callback) => get('rule', data, callback);

//邀请排行榜
export const inviteRank = (data, callback) => post('user.getInviteNum', data, callback);
//新拉新排行榜
export const newRanking = (data, callback) => get('user/invite/rank', data, callback);
//消费排行榜
export const payRank = (data, callback) => post('user.getOrderSort', data, callback);
//分销排行榜
export const distribution = (data, callback) => post('user.disRanking', data, callback);
//衍生品奖励
export const ysgetderivative = (data, callback) => post('user.derivative', data, callback);
//衍生品我的奖励
export const ysmyCollect = (data, callback) => post('user.myCollect', data, callback);
//12衍生品奖池列表
export const getDerivativeList = (data, callback) => post('user.derivative_12', data, callback);
//衍生品-获取衍生品列表(列表弹框)
export const gettkDerivativeList = (data, callback) => post('user.getDerivativeList', data, callback);
//衍生品详情
export const getYspDetails = (data, callback) => post('user.yspDetails', data, callback);
//我的藏品堆叠列表
export const getMyGoodsList = (data, callback) => post('market.myGoodsList', data, callback);
//获取列表
export const getMyGoodsListById = (data, callback) => get('nft', data, callback);
//验证订单状态
export const checkOrderStatus = (data, callback) => post('goodsorder.checkorderstatus', data, callback);
//我的抽签列表
export const getMyLotteryList = (data, callback) => post('invite.myLotteryList', data, callback);

//获取新元列表
export const getXinyuanList = (data, callback) => post('goods.xinyuanList', data, callback);

//获取疆域列表
export const getAreaList2 = (data, callback) => post('user.areaTypeList', data, callback);
//选择疆域
export const chooseArea = (data, callback) => post('user.addArea', data, callback);

//获取寄售列表商品
export const getMarketGoodsList = (data, callback) => post('market.marketGoodsList', data, callback);
//动态相关
export const getTimelineList = (data, callback) => post('community.squareList', data, callback);
//点赞/取消一条动态
export const agree = (data, callback) => post('community.givelike', data, callback);

//获取详情
export const getTimelineDetails = (data, callback) => post('community.details', data, callback);
//获取评论列表
export const getCommentsList = (data, callback) => post('community.getCommlist', data, callback);

//对评论点赞/取消
export const agreeComments = (data, callback) => post('community.comGivelike', data, callback);

//获取举报类型
export const getReportType = (data, callback) => post('community.reportType', data, callback);
//举报动态
export const addReport = (data, callback) => post('community.addreport', data, callback);

//关注某个用户
export const addFocus = (data, callback) => post('community.focus', data, callback);
//回复评论
export const reply = (data, callback) => post('community.addComment', data, callback);

//查看他人或自己的动态
export const getUserList = (data, callback) => post('community.getList', data, callback);

//发布动态
export const release = (data, callback) => post('community.addCommunity', data, callback);

//删除动态
export const deleteTimeline = (data, callback) => post('community.delCommunity', data, callback);

//获取熔炉列表
export const getStoveList = (data, callback) => post('stove.stoveList', data, callback);
//获取熔炼详情
export const getStoveInfo = (data, callback) => post('stove.stove', data, callback);

//熔炉所需材料
export const getStoveMaterial = (data, callback) => post('stove.material', data, callback);
//我的材料
export const getStoveMy = (data, callback) => post('stove.mymaterial', data, callback);
//熔炼藏品
// export const addMaterial = (data, callback) => post('stove.addmaterial', data, callback);

export const getPaymentInfo = (data, callback) => post('payments.getPaymentInfo', data, callback);

//获取公告类型
export const getNoticeType = (data, callback) => get('notice/category', data, callback);

//抽签
export const getLotteryCode = (data, callback) => post('goods.getLotteryCode', data, callback);

//抽奖界面
export const stoveList = (data, callback) => post('stove.stoveList', data, callback);

//抽奖
export const addmateriall = (data, callback) => post('stove.addmaterial', data, callback);

//抽奖记录
export const record = (data, callback) => post('stove.record', data, callback);

//杉德支付
export const openUser = (data, callback) => post('user.openUser', data, callback);

//合成列表
export const furnaceList = (data, callback) => get('item/merge', data, callback);
//判断合成材料是否充足
export const materialcount = (data, callback) => post('Furnace.materialcount', data, callback);

//我的材料
export const material = (data, callback) => post('Furnace.material', data, callback);
//合成详情
export const furnacel = (data, callback) => get('item/merge/' + data, {}, callback);

//分裂列表
export const split = (data, callback) => post('market.split', data, callback);

//分裂详情
export const splitMessage = (data, callback) => post('market.splitMessage', data, callback);

//分裂藏品
export const splitOrder = (data, callback) => post('market.splitOrder', data, callback);


//验证密码
export const checkPwd = (data, callback) => post('user.checkPwd', data, callback);


//统统钱包
export const sumpayCashier = (data, callback) => post('user.sumpayCashier', data, callback);


//退款
export const orderRefund = (data, callback) => post('goodsorder.orderRefund', data, callback);
//注销
export const upCancel = (data, callback) => post('user.upCancel', data, callback);

//合成记录
export const synthesizedLog = (data, callback) => post('Furnace.synthesizedLog', data, callback);
//开盒记录
export const mangheList = (data, callback) => post('manghe.mangheList', data, callback);
//检测验证码是否正确
export const checkSms = (data, callback) => post('user.checkSms', data, callback);
//汇付
export const openAccount = (data, callback) => post('user.openAccount', data, callback);
//两元支付 user.hfpay_wallet
export const gethfpay = (data, callback) => post('user.hfpay_wallet', data, callback);
//积分商城列表
export const getShopList = (data, callback) => post('pointgoods.lists', data, callback);
//积分商城详情
export const getShopInfo = (data, callback) => post('pointgoods.detail', data, callback);
//积分商城兑换
export const shopPay = (data, callback) => post('pointgoods.exchange', data, callback);
//积分明细
export const getPointList = (data, callback) => get('activity/integral/trade', data, callback);
//兑换记录
export const getPointExChangeList = (data, callback) => post('pointgoods.exchangeLog', data, callback);
//ai生成图片接口开关
export const getAIpicture = callback => post('pages.ai', {}, callback);
//开通汇付接口
export const hfpayWallet = callback => post('user.hfpay_wallet', {}, callback);

export const signout = (data,callback) => post('passport/signout', data, callback);
//积分
export const getIntegralBalance = callback => get('activity/integral/balance', {}, callback);
//免费喝验证订单
export const mfvValidByOrderId = (data,callback) => post('mfh/validByOrderId',data, callback);
//免费喝我的领取
export const mfvAccessByMfhId = (data,callback) => post('mfh/accessByMfhId',data, callback);
//免费喝我的奖励列表
export const mfvgetByUid = (callback) => get('mfh/getByUid',{},callback);
//交易进度接口
export const ntfItemNum = (id,callback) => get(`nft/itmeNum/${id}`,{},callback);

//衍生品列表
export const getDerive = (callback) => get('derive',{},callback);
//衍生品详情
export const getDeriveDetail = (id,callback) => get(`derive/${id}`,{},callback);
// 二级交易列表数据
export const getOrderSum = (id,callback) => get(`order/sum/${id}`,{},callback);
//查询开市公告
export const getOpeningTrade = callback => get('nft/market/trade',{},callback);
//盈利分析--城市分销商mfh/cityDistributor/{boss}/{supply}
export const getcityDistributor = (boss,supply,callback) => get(`mfh/cityDistributor/${boss}/${supply}`,{},callback);
//盈利分析--店主
export const getspencer = (quantity,callback) => get(`mfh/spencer/${quantity}`,{},callback);
//盈利分析--供应链
export const getsupply = (quantity,callback) => get(`mfh/supply/${quantity}`,{},callback);
//盈利分析--高级合伙人
export const getadvanced = (quantity,callback) => get(`mfh/advanced/${quantity}`,{},callback);
//盈利分析--渠道商
export const getditch = (quantity,callback) => get(`mfh/ditch/${quantity}`,{},callback);
//盈利分析--推广达人
export const getpromotion = (quantity,number,callback) => get(`mfh/promotion/${quantity}/${number}`,{},callback);
// 登录稼衣生活
export const jyLoginByToken = (data,callback) => post('passport/jyToken',data, callback);
// 系统钱包
export const savePurseAccount = (data,callback) => post('purse/purseAccount/savePurseAccount',data, callback);
//系统钱包详情
export const pursedetailId = (callback) => post('purse/purseAccount/detailId',{},callback);
// 交易 系统钱包交易记录
export const purseChangeDetailList = (pageNo,callback) => post(`purse/purseChangeDetail/list?pageNo=${pageNo}`,{},callback);
// 账单 系统钱包交易记录
export const purseExtractTopupList = (pageNo,callback) => get(`purse/purseExtractTopup/list?pageNo=${pageNo}`,{},callback);
//系统钱包交易记录详情
export const purseDetailXiang = (quantity,callback) => post(`purse/purseExtractTopup/detail/${quantity}`,{},callback);
//系统钱包账单记录详情 purse/purseChangeDetail/detailXiang/
export const purseChangeDetail = (quantity,callback) => post(`purse/purseChangeDetail/detailXiang/${quantity}`,{},callback);
// 系统钱包上传图片
export const pursesaveTopup = (data,callback) => post('purse/purseExtractTopup/saveTopup',data,callback);
// 系统钱包充值
export const purseSavePicture = (data,callback) => post('purse/purseExtractTopup/savePicture/',data,callback);
//系统钱包获取银行卡
export const purseCardLsit = (callback) => get('purse/purseCard/list/',{},callback);
//系统钱包提现
export const purseSaveExtract = (data,callback) => post('purse/purseExtractTopup/saveExtract',data,callback);
//添加银行卡
export const addSaveCard = (data,callback) => post('purse/purseCard/saveCard',data,callback);
//获取银行信息
export const getDictBank = (callback) => get('purse/purseDictBank/dictBank',{},callback);
//系统钱包获取信息
export const getRealName = (callback) => post('purse/purseCard/realName',{},callback);
//系统钱包添加企业用户
export const addPurseEnt = (data,callback) => post('purse/purseEnt/save',data,callback);
//验证企业是否认证
export const getPurseEnte = (callback) => post('purse/purseEnt/getPurseEnt',{},callback);
//修改企业认证信息
export const updatePurseEntDetail = (data,callback) => post('purse/purseEnt/update',data,callback);
//获取系统钱包手续费
export const getPurseConfig = (callback) => get('purse/purseAccount/purseconfig',{},callback);
//短剧宝免登录
export const getYeepayDjh = (callback) => post('yeepay/djb',{},callback);
// ai 大赛轮播图
export const getAiBanner = (data, callback) => get('aievent/banner/list', data, callback);
//ai大赛首页进程
export const getAiEvent = (callback) => get('aievent/aiEvent/evolve', {}, callback);
// ai首页赛事列表
export const getAiEventList = (data,callback) => get('aievent/aiEvent/list', data,callback);
//ai创建订单
export const addSubmitAiOrder = (data,callback) => post('aievent/aiOrder/submitAiOrder', data,callback);
//支付订单
export const aiOrderPay = (data,callback) => post('aievent/aiOrder/pay', data,callback);
//ai大赛 我的钻石明细
export const getAiDiamondDetail = (pageNo,callback) => get(`aievent/aiDiamondDetail/list?pageNo=${pageNo}`, {},callback);
//ai大赛 投票记录
export const aiTicketLogList = (callback) => post('aievent/aiTicketLog/aiTicketLogList', {},callback);
//ai 生成风格
export const aigetStyle = (callback) => post('artPic/getStyle', {},callback);
//ai 生成尺寸
export const aiGetScale = (callback) => post('artPic/getScale', {},callback);
//ai 我的奖品列表
export const aiPrizesList = (callback) => get('aievent/aiPrizes/aiPrizesList', {},callback);
//ai 我的奖品兑换信息
export const aiPrizesGrant = (data,callback) => get('aievent/aiPrizes/aiPrizesGrant', data,callback);
//ai 获取灵感余额
export const getAiDiamond = (callback) => get('aievent/aiDiamond/detail',{},callback); 
//ai首页验证是否有生成数据
export const airRemind = (callback) => post('aievent/aiEventWorks/remind',{},callback); 
export const aiWorksInfo = (data,callback) => post('aievent/aiEventWorks/worksInfo', data,callback);

//验证是否支付
export const aiCheckPay = (data,callback) => post('aievent/aiOrder/checkPay',data,callback);
export const getYeepayDjb = (callback) => post('yeepay/djb',{},callback);
//置换活动列表
export const getJfList = (data,callback) => get('/item/jfList',data,callback);
//置换成功
export const convertList = (data,callback) => post('/nft/convertIntegral/convert',data,callback);
